package com.zw.stock_sell_storage.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zw.stock_sell_storage.dto.LogDto;
import com.zw.stock_sell_storage.dto.MyPageDto;
import com.zw.stock_sell_storage.dto.ex.LogDtoEx;
import com.zw.stock_sell_storage.service.ILogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    ILogService iLogService;

    @RequestMapping("/queryLogList")
    public Page<LogDto> queryLogList(@RequestBody MyPageDto<LogDtoEx> myPageDto){
        return iLogService.queryLogList(myPageDto);
    }

    @RequestMapping("/addLog")
    public boolean addLog(@RequestBody LogDto logDto){
        return iLogService.addLog(logDto);
    }
}
